Tricks to detect even and odd permutation